/* eslint-disable @typescript-eslint/no-empty-object-type */

// import axios from 'axios';
import { requestClient } from '#/api/request';

export namespace pendinginspectApi {
  export interface pendinginspectListParams {
    pageNum: number;
    pageSize: number;
  }
  export interface Params {}
  export interface Row {
    searchValue: null;
    createBy: null;
    createTime: null;
    updateBy: null;
    updateTime: null;
    remark: null;
    params: Params;
    sourceDocId: number;
    sourceDocCode: string;
    sourceDocType: string;
    sourceLineId: number;
    recordTime: string;
    qcType: string;
    qcDetailType: string;
    itemId: number;
    itemCode: string;
    itemName: string;
    specification: string;
    unitOfMeasure: string;
    unitName: string;
    quantityCheck: string;
    workOrderId: null;
    workOrderCode: null;
    workOrderName: null;
    workstationId: null;
    workstationCode: null;
    workstationName: null;
    vendorClientId: number;
    vendorClientCode: string;
    vendorClientName: string;
    vendorClientNick: string;
    batchCode: null;
    taskId: null;
    taskCode: null;
    taskName: null;
    warehouseId: null;
    warehouseCode: null;
    warehouseName: null;
    locationId: null;
    locationCode: null;
    locationName: null;
    areaId: null;
    areaCode: null;
    areaName: null;
    address: null;
  }
  export interface pendinginspectListResult {
    total: number;
    rows: Row[];
    code: number;
    msg: string;
  }
}

// 获取缺陷列表
export const getPendinginspectList = (
  data: pendinginspectApi.pendinginspectListParams,
) => {
  return requestClient.get<pendinginspectApi.pendinginspectListResult>(
    '/mes/qc/pending/list',
    { params: data },
  );
};
